
public class SelectiveSort {

	public static void main(String args[]) {
		int a[]={ 5, 2, 6, 3, 100, 10, 1 };
		int size=a.length;
		for (int i=0;i<size-1;i++) {
			for (int j=i+1;j<size;j++) {
				if (a[i]<a[j]) {
					int t=a[i];
					a[i]=a[j];
					a[j]=t;
				}
			}
		}
		for (int i=0;i<size;i++) {
			System.out.print(a[i]+" ");
		}
	}
}
